package com.aqiang.day0528_shop.main.adapter

import android.support.v4.content.ContextCompat
import com.aqiang.day0528_shop.R
import com.aqiang.day0528_shop.main.entity.GoodsTypeEntity
import com.bumptech.glide.Glide
import com.bumptech.glide.load.resource.bitmap.CircleCrop
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder

class GoodsTypeAdapter(var lay:Int,var mutableList: List<GoodsTypeEntity>):BaseQuickAdapter<GoodsTypeEntity,BaseViewHolder>(lay,mutableList) {
    override fun convert(helper: BaseViewHolder?, item: GoodsTypeEntity?) {
        helper!!.setText(R.id.tv_item_goods_type,item!!.category_name)
        Glide.with(mContext)
            .load(ContextCompat.getDrawable(mContext,R.drawable.banner_c))
            .transform(CircleCrop())
            .into(helper.getView(R.id.iv_item_goods))
    }
}